<!DOCTYPE html>
<html lang="en">
<head>
    {% load staticfiles %}
    <meta charset="UTF-8">
    {% include 'user_verify/base.html' %}
    <title>登录</title>
    <link rel="shortcut icon" href="{% static 'stu_exam_manage/logo/weblogo.ico' %}" />
</head>
<body>
    <div id="bck">
        <img src="{% static 'user_verify/images/1.jpg' %}" alt="" width="100%" height="100%">
    </div>
    <div id="center">
        <div id="select">
            <a class="btn btn-default btn-lg login" href="/user_verify/login.html">登陆</a><!--
            --><a class="btn btn-default btn-lg register" href="/user_verify/register.html">注册</a>
        </div>
        <form action="" method="post" >
            {% csrf_token %}
            <table align="center">
                <tr>
                    <td>用户名&nbsp;&nbsp;</td>
                    <td>{{ userform.uname }}{{ userform.errors.uname.0 }}</td>
                </tr>
                <tr>
                    <td>密&nbsp;&nbsp;&nbsp;码&nbsp;&nbsp;</td>
                    <td>{{ userform.upwd }}</td>
                </tr>
                <tr align="center">
                    <td colspan="2">
                        <input class="btn btn-primary btn-lg btn-block" type="submit" value="登陆">
                    </td>
                </tr>
                {% ifequal status.code 100 %}
                <tr>
                    <td colspan="2" align="center" style="color: red;">{{ status.msg }}</td>
                </tr>
                {% endifequal %}
                {% ifequal status.code 201 %}
                <tr>
                    <td colspan="2" align="center" style="color: green;">{{ status.msg }}</td>
                </tr>
                {% endifequal %}

            </table>
        </form>
    </div>


    <style>
        #bck{
            width: 100%;
            height: 100%;
            position: fixed;
            z-index: -10    ;
        }
        #center{
            background-color: #d0e9c6;
            position: fixed;
            width: 400px;
            height: 300px;
            top: 25%;
            left: 37%;
        }
        #select a{
            width: 50%;
        }
        input{
             margin: 9% 0;
         }
    </style>
    <script>
        function init() {
            $('.register').css('background', 'gainsboro')

        }
        init();

        function goRegister() {
            window.location.href = '/user_verify/register.html'
        }
        
    </script>
</body>
</html>